home *** CD-ROM | disk | FTP | other *** search
/ MacAddict 114 / macaddict114.cdr / Software / Utilities / macam.0.8.4.dmg / macam sources / app_specific / MyMovieRecorder.h < prev    next >
Encoding:
Text File  |  2002-11-12  |  1.8 KB  |  46 lines

  1. //
  2. //  MyMovieRecorder
  3. //
  4. //  A ultra-primitive recording facility for QuickTime movies
  5. //
  6.  
  7. #import <Cocoa/Cocoa.h>
  8. #import <Carbon/Carbon.h>
  9. #import <QuickTime/QuickTime.h>
  10.  
  11. @interface MyMovieRecorder : NSObject {
  12.     CodecType codecType;
  13.     CodecQ codecSpatialQuality;
  14.     Handle lastImageData;
  15.     ImageDescriptionHandle lastImageDescription;
  16.     double lastImageTime;
  17.     Movie mov;
  18.     Track videoTrack;
  19.     Media videoTrackMedia;
  20.     short resRefNum;
  21.     BOOL recording;
  22.     NSString* path;
  23. }
  24.  
  25. - (id) initWithSize:(NSSize)size
  26.         compression:(NSString*)cType    // currently "RAW" (uncompressed) or "JPEG" (Photo-JPEG)
  27.             quality:(float)cQual    // 0 .. 1
  28.                path:(NSString*)path;    // Path for new movie file
  29.  
  30. /*Initializes the recorder, inits a fresh movie and movie file and starts a recording session with the given parameters. The path may start with a tilde for the current user's home directory. If the path cannot be used for some reason (file already exists, parent path doesn't exist, path is NULL, ...), a new file is created in a system's chosen temporary file location. */
  31.  
  32.  
  33. - (BOOL) addFrame:(NSBitmapImageRep*)imageRep at:(double)time;
  34. //Adds a video frame to the recording session
  35.  
  36. - (BOOL) finishRecordingAt:(double)time;
  37. //Stop the recording session
  38.  
  39. - (NSString*) moviePath;
  40. //Returns the path of the temporary file containing the recorded movie
  41.  
  42. - (void) keepMovieFile;
  43. //Causes the MovieRecorder to forget about the current movie file. I.e. it will not be deleted when the MovieRecorder instance is deallocated. Afterwards, the instance has no connection to the file any more (this also means that it cannot return the movie path any more). This ususally means that the called MovieRecorder object becomes useless - you probably want to release it after this call.
  44.  
  45. @end
  46.